/* ----------------------------------------------------------------------
*
* Copyright (C) 2025 XiaoFei. All rights reserved.
*
* $file:		XiaoFei_Usart3.h
* $Date:        13-January-2025
* $Revision: 	V1
* $Project: 	XiaoFei BSP Library
*
* -------------------------------------------------------------------- */

#ifndef __XiaoFei_Usart3_H
#define __XiaoFei_Usart3_H

#define Usart3_AddRx
#define Usart3_GPIO					    GPIOB
#define Usart3_Pin_TX				    GPIO_Pin_10
#define Usart3_BaudRate			        9600

#ifdef Usart3_AddRx
	#define Usart3_Pin_RX				GPIO_Pin_11
	#define USART3_Group				NVIC_PriorityGroup_2
	#define USART3_ITPre				1
	#define USART3_ITSub				1
#endif

/* 
* @function: 	Usart3_Init
*/
void Usart3_Init(void);

/* 
* @function: 	Usart3_SendByte
* @parameter:	[in] Byte					 The byte will be send.
*/
void Usart3_SendByte(unsigned char Byte);

/* 
* @function: 	Usart3_Printf
* @parameter:	[in] format					 The parameter will be send in Usart3_Printf.
*/
void Usart3_Printf(char *format, ...);

#ifdef Usart3_AddRx
/* 
* @function: 	USART3_IRQHandler
* @callback:	The function will be callback when the Usart3 receive the data.
*/
void USART3_IRQHandler(void);
#endif

#endif

